package service.impl;

import java.sql.ResultSet;
import java.util.List;

import service.IBorrowService;
import dao.IBorrowDao;
import dao.impl.BorrowDaoImpl;
import entity.Book;
import entity.Borrow;

public class BorrowServiceImpl implements IBorrowService{

	private IBorrowDao borrowDao=new BorrowDaoImpl();

	@Override
	public int borrowBook(Borrow borrow) {
		return borrowDao.borrowBook(borrow);
	}

	@Override
	public int AgainBorrowBook(Borrow borrow) {
		return borrowDao.AgainBorrowBook(borrow);
	}

	@Override
	public int returnBook(Borrow borrow) {
		return borrowDao.returnBook(borrow);
	}

	@Override
	public Borrow findByBorrow(String id, String bookid) {
		return borrowDao.findByBorrow(id, bookid);
	}

	@Override
	public List<Borrow> findAllBorrow() {
		return borrowDao.findAllBorrow();
	}

	@Override
	public List<Borrow> findAllPersonBorrow(String id) {
		return borrowDao.findAllPersonBorrow(id);
	}

	@Override
	public Borrow findByBookname(String bookname) {
		return borrowDao.findByBookname(bookname);
	}

	@Override
	public Borrow findByOneBookid(String bookid) {
		return borrowDao.findByOneBookid(bookid);
	}

	@Override
	public List<Borrow> findByBookid(String bookid) {
		return borrowDao.findByBookid(bookid);
	}

	@Override
	public List<Borrow> findById(String id) {
		return borrowDao.findById(id);
	}

	@Override
	public Borrow findPersonBorrowByBookname(String bookname) {
		return borrowDao.findPersonBorrowByBookname(bookname);
	}

}
